(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

app(nil, k) → k
app(l, nil) → l
app(cons(x, l), k) → cons(x, app(l, k))
sum(cons(x, nil)) → cons(x, nil)
sum(cons(x, cons(y, l))) → sum(cons(a(x, y, h), l))
a(h, h, x) → s(x)
a(x, s(y), h) → a(x, y, s(h))
a(x, s(y), s(z)) → a(x, y, a(x, s(y), z))
a(s(x), h, z) → a(x, z, z)

Rewrite Strategy: FULL

(1) DecreasingLoopProof (EQUIVALENT transformation)

The following loop(s) give(s) rise to the lower bound Ω(2n):
The rewrite sequence
a(s(s(x22014_0)), s(h), h) →+ a(x22014_0, a(s(x22014_0), s(h), h), a(s(x22014_0), s(h), h))
gives rise to a decreasing loop by considering the right hand sides subterm at position [1].
The pumping substitution is [x22014_0 / s(x22014_0)].
The result substitution is [ ].

The rewrite sequence
a(s(s(x22014_0)), s(h), h) →+ a(x22014_0, a(s(x22014_0), s(h), h), a(s(x22014_0), s(h), h))
gives rise to a decreasing loop by considering the right hand sides subterm at position [2].
The pumping substitution is [x22014_0 / s(x22014_0)].
The result substitution is [ ].

(2) BOUNDS(2^n, INF)

(3) RenamingProof (EQUIVALENT transformation)

Renamed function symbols to avoid clashes with predefined symbol.

(4) Obligation:

Runtime Complexity Relative TRS:
The TRS R consists of the following rules:

app(nil, k) → k
app(l, nil) → l
app(cons(x, l), k) → cons(x, app(l, k))
sum(cons(x, nil)) → cons(x, nil)
sum(cons(x, cons(y, l))) → sum(cons(a(x, y, h), l))
a(h, h, x) → s(x)
a(x, s(y), h) → a(x, y, s(h))
a(x, s(y), s(z)) → a(x, y, a(x, s(y), z))
a(s(x), h, z) → a(x, z, z)

S is empty.
Rewrite Strategy: FULL

(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(6) Obligation:

TRS:
Rules:
app(nil, k) → k
app(l, nil) → l
app(cons(x, l), k) → cons(x, app(l, k))
sum(cons(x, nil)) → cons(x, nil)
sum(cons(x, cons(y, l))) → sum(cons(a(x, y, h), l))
a(h, h, x) → s(x)
a(x, s(y), h) → a(x, y, s(h))
a(x, s(y), s(z)) → a(x, y, a(x, s(y), z))
a(s(x), h, z) → a(x, z, z)

Types:
app :: nil:cons → nil:cons → nil:cons
nil :: nil:cons
cons :: h:s → nil:cons → nil:cons
sum :: nil:cons → nil:cons
a :: h:s → h:s → h:s → h:s
h :: h:s
s :: h:s → h:s
hole_nil:cons1_0 :: nil:cons
hole_h:s2_0 :: h:s
gen_nil:cons3_0 :: Nat → nil:cons
gen_h:s4_0 :: Nat → h:s

(7) OrderProof (LOWER BOUND(ID) transformation)

Heuristically decided to analyse the following defined symbols:
app, sum, a

They will be analysed ascendingly in the following order:
a < sum

(8) Obligation:

TRS:
Rules:
app(nil, k) → k
app(l, nil) → l
app(cons(x, l), k) → cons(x, app(l, k))
sum(cons(x, nil)) → cons(x, nil)
sum(cons(x, cons(y, l))) → sum(cons(a(x, y, h), l))
a(h, h, x) → s(x)
a(x, s(y), h) → a(x, y, s(h))
a(x, s(y), s(z)) → a(x, y, a(x, s(y), z))
a(s(x), h, z) → a(x, z, z)

Types:
app :: nil:cons → nil:cons → nil:cons
nil :: nil:cons
cons :: h:s → nil:cons → nil:cons
sum :: nil:cons → nil:cons
a :: h:s → h:s → h:s → h:s
h :: h:s
s :: h:s → h:s
hole_nil:cons1_0 :: nil:cons
hole_h:s2_0 :: h:s
gen_nil:cons3_0 :: Nat → nil:cons
gen_h:s4_0 :: Nat → h:s

Generator Equations:
gen_nil:cons3_0(0) ⇔ nil
gen_nil:cons3_0(+(x, 1)) ⇔ cons(h, gen_nil:cons3_0(x))
gen_h:s4_0(0) ⇔ h
gen_h:s4_0(+(x, 1)) ⇔ s(gen_h:s4_0(x))

The following defined symbols remain to be analysed:
app, sum, a

They will be analysed ascendingly in the following order:
a < sum

(9) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
app(gen_nil:cons3_0(n6_0), gen_nil:cons3_0(b)) → gen_nil:cons3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

Induction Base:
app(gen_nil:cons3_0(0), gen_nil:cons3_0(b)) →RΩ(1)
gen_nil:cons3_0(b)

Induction Step:
app(gen_nil:cons3_0(+(n6_0, 1)), gen_nil:cons3_0(b)) →RΩ(1)
cons(h, app(gen_nil:cons3_0(n6_0), gen_nil:cons3_0(b))) →IH
cons(h, gen_nil:cons3_0(+(b, c7_0)))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(10) Complex Obligation (BEST)

(11) Obligation:

TRS:
Rules:
app(nil, k) → k
app(l, nil) → l
app(cons(x, l), k) → cons(x, app(l, k))
sum(cons(x, nil)) → cons(x, nil)
sum(cons(x, cons(y, l))) → sum(cons(a(x, y, h), l))
a(h, h, x) → s(x)
a(x, s(y), h) → a(x, y, s(h))
a(x, s(y), s(z)) → a(x, y, a(x, s(y), z))
a(s(x), h, z) → a(x, z, z)

Types:
app :: nil:cons → nil:cons → nil:cons
nil :: nil:cons
cons :: h:s → nil:cons → nil:cons
sum :: nil:cons → nil:cons
a :: h:s → h:s → h:s → h:s
h :: h:s
s :: h:s → h:s
hole_nil:cons1_0 :: nil:cons
hole_h:s2_0 :: h:s
gen_nil:cons3_0 :: Nat → nil:cons
gen_h:s4_0 :: Nat → h:s

Lemmas:
app(gen_nil:cons3_0(n6_0), gen_nil:cons3_0(b)) → gen_nil:cons3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

Generator Equations:
gen_nil:cons3_0(0) ⇔ nil
gen_nil:cons3_0(+(x, 1)) ⇔ cons(h, gen_nil:cons3_0(x))
gen_h:s4_0(0) ⇔ h
gen_h:s4_0(+(x, 1)) ⇔ s(gen_h:s4_0(x))

The following defined symbols remain to be analysed:
a, sum

They will be analysed ascendingly in the following order:
a < sum

(12) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
a(gen_h:s4_0(n654_0), gen_h:s4_0(0), gen_h:s4_0(0)) → gen_h:s4_0(1), rt ∈ Ω(1 + n6540)

Induction Base:
a(gen_h:s4_0(0), gen_h:s4_0(0), gen_h:s4_0(0)) →RΩ(1)
s(gen_h:s4_0(0))

Induction Step:
a(gen_h:s4_0(+(n654_0, 1)), gen_h:s4_0(0), gen_h:s4_0(0)) →RΩ(1)
a(gen_h:s4_0(n654_0), gen_h:s4_0(0), gen_h:s4_0(0)) →IH
gen_h:s4_0(1)

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(13) Complex Obligation (BEST)

(14) Obligation:

TRS:
Rules:
app(nil, k) → k
app(l, nil) → l
app(cons(x, l), k) → cons(x, app(l, k))
sum(cons(x, nil)) → cons(x, nil)
sum(cons(x, cons(y, l))) → sum(cons(a(x, y, h), l))
a(h, h, x) → s(x)
a(x, s(y), h) → a(x, y, s(h))
a(x, s(y), s(z)) → a(x, y, a(x, s(y), z))
a(s(x), h, z) → a(x, z, z)

Types:
app :: nil:cons → nil:cons → nil:cons
nil :: nil:cons
cons :: h:s → nil:cons → nil:cons
sum :: nil:cons → nil:cons
a :: h:s → h:s → h:s → h:s
h :: h:s
s :: h:s → h:s
hole_nil:cons1_0 :: nil:cons
hole_h:s2_0 :: h:s
gen_nil:cons3_0 :: Nat → nil:cons
gen_h:s4_0 :: Nat → h:s

Lemmas:
app(gen_nil:cons3_0(n6_0), gen_nil:cons3_0(b)) → gen_nil:cons3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)
a(gen_h:s4_0(n654_0), gen_h:s4_0(0), gen_h:s4_0(0)) → gen_h:s4_0(1), rt ∈ Ω(1 + n6540)

Generator Equations:
gen_nil:cons3_0(0) ⇔ nil
gen_nil:cons3_0(+(x, 1)) ⇔ cons(h, gen_nil:cons3_0(x))
gen_h:s4_0(0) ⇔ h
gen_h:s4_0(+(x, 1)) ⇔ s(gen_h:s4_0(x))

The following defined symbols remain to be analysed:
sum

(15) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol sum.

(16) Obligation:

TRS:
Rules:
app(nil, k) → k
app(l, nil) → l
app(cons(x, l), k) → cons(x, app(l, k))
sum(cons(x, nil)) → cons(x, nil)
sum(cons(x, cons(y, l))) → sum(cons(a(x, y, h), l))
a(h, h, x) → s(x)
a(x, s(y), h) → a(x, y, s(h))
a(x, s(y), s(z)) → a(x, y, a(x, s(y), z))
a(s(x), h, z) → a(x, z, z)

Types:
app :: nil:cons → nil:cons → nil:cons
nil :: nil:cons
cons :: h:s → nil:cons → nil:cons
sum :: nil:cons → nil:cons
a :: h:s → h:s → h:s → h:s
h :: h:s
s :: h:s → h:s
hole_nil:cons1_0 :: nil:cons
hole_h:s2_0 :: h:s
gen_nil:cons3_0 :: Nat → nil:cons
gen_h:s4_0 :: Nat → h:s

Lemmas:
app(gen_nil:cons3_0(n6_0), gen_nil:cons3_0(b)) → gen_nil:cons3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)
a(gen_h:s4_0(n654_0), gen_h:s4_0(0), gen_h:s4_0(0)) → gen_h:s4_0(1), rt ∈ Ω(1 + n6540)

Generator Equations:
gen_nil:cons3_0(0) ⇔ nil
gen_nil:cons3_0(+(x, 1)) ⇔ cons(h, gen_nil:cons3_0(x))
gen_h:s4_0(0) ⇔ h
gen_h:s4_0(+(x, 1)) ⇔ s(gen_h:s4_0(x))

No more defined symbols left to analyse.

(17) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
app(gen_nil:cons3_0(n6_0), gen_nil:cons3_0(b)) → gen_nil:cons3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

(18) BOUNDS(n^1, INF)

(19) Obligation:

TRS:
Rules:
app(nil, k) → k
app(l, nil) → l
app(cons(x, l), k) → cons(x, app(l, k))
sum(cons(x, nil)) → cons(x, nil)
sum(cons(x, cons(y, l))) → sum(cons(a(x, y, h), l))
a(h, h, x) → s(x)
a(x, s(y), h) → a(x, y, s(h))
a(x, s(y), s(z)) → a(x, y, a(x, s(y), z))
a(s(x), h, z) → a(x, z, z)

Types:
app :: nil:cons → nil:cons → nil:cons
nil :: nil:cons
cons :: h:s → nil:cons → nil:cons
sum :: nil:cons → nil:cons
a :: h:s → h:s → h:s → h:s
h :: h:s
s :: h:s → h:s
hole_nil:cons1_0 :: nil:cons
hole_h:s2_0 :: h:s
gen_nil:cons3_0 :: Nat → nil:cons
gen_h:s4_0 :: Nat → h:s

Lemmas:
app(gen_nil:cons3_0(n6_0), gen_nil:cons3_0(b)) → gen_nil:cons3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)
a(gen_h:s4_0(n654_0), gen_h:s4_0(0), gen_h:s4_0(0)) → gen_h:s4_0(1), rt ∈ Ω(1 + n6540)

Generator Equations:
gen_nil:cons3_0(0) ⇔ nil
gen_nil:cons3_0(+(x, 1)) ⇔ cons(h, gen_nil:cons3_0(x))
gen_h:s4_0(0) ⇔ h
gen_h:s4_0(+(x, 1)) ⇔ s(gen_h:s4_0(x))

No more defined symbols left to analyse.

(20) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
app(gen_nil:cons3_0(n6_0), gen_nil:cons3_0(b)) → gen_nil:cons3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

(21) BOUNDS(n^1, INF)

(22) Obligation:

TRS:
Rules:
app(nil, k) → k
app(l, nil) → l
app(cons(x, l), k) → cons(x, app(l, k))
sum(cons(x, nil)) → cons(x, nil)
sum(cons(x, cons(y, l))) → sum(cons(a(x, y, h), l))
a(h, h, x) → s(x)
a(x, s(y), h) → a(x, y, s(h))
a(x, s(y), s(z)) → a(x, y, a(x, s(y), z))
a(s(x), h, z) → a(x, z, z)

Types:
app :: nil:cons → nil:cons → nil:cons
nil :: nil:cons
cons :: h:s → nil:cons → nil:cons
sum :: nil:cons → nil:cons
a :: h:s → h:s → h:s → h:s
h :: h:s
s :: h:s → h:s
hole_nil:cons1_0 :: nil:cons
hole_h:s2_0 :: h:s
gen_nil:cons3_0 :: Nat → nil:cons
gen_h:s4_0 :: Nat → h:s

Lemmas:
app(gen_nil:cons3_0(n6_0), gen_nil:cons3_0(b)) → gen_nil:cons3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

Generator Equations:
gen_nil:cons3_0(0) ⇔ nil
gen_nil:cons3_0(+(x, 1)) ⇔ cons(h, gen_nil:cons3_0(x))
gen_h:s4_0(0) ⇔ h
gen_h:s4_0(+(x, 1)) ⇔ s(gen_h:s4_0(x))

No more defined symbols left to analyse.

(23) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
app(gen_nil:cons3_0(n6_0), gen_nil:cons3_0(b)) → gen_nil:cons3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

(24) BOUNDS(n^1, INF)